package com.zmn.oms.third.pinduoduo.service;

import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.entity.work.OrderWorkLogChange;
import com.zmn.oms.third.pinduoduo.dto.PinDuoDuoShopExamineDTO;
import com.zmn.oms.third.pinduoduo.dto.api.PinDuoDuoResponse;

/**
 * 类描述：与拼多多平台的对接接口
 *
 * @author wangxiaokun
 * @since 2020/5/29 15:46
 */
public interface PinDuoDuoService {

    /**
     * 处理拼多多发送的订单消息（店铺签约，创建订单，预约通知，取消订单等）
     * @param paramsStr
     * @return com.zmn.oms.third.pinduoduo.dto.api.PinDuoDuoResponse
     * @author wangxiaokun
     */
    PinDuoDuoResponse handleSyncOrderMsg(String paramsStr) throws OmsBaseException;

    /**
     * 同步接单信息到拼多多服务
     * @param orderWorkLogChange
     * @return void
     * @author wangxiaokun
     */
    void sendAcceptOrderToPinDuoDuo(OrderWorkLogChange orderWorkLogChange) throws OmsBaseException;

    /**
     * 发送消息给拼多多服务
     * @param pathRequest
     * @param paramJson
     * @return com.zmn.oms.third.pinduoduo.dto.api.PinDuoDuoResponse
     * @author wangxiaokun
     */
    PinDuoDuoResponse sendRequestToPinDuoDuo(String pathRequest, String paramJson);

    /**
     * 同步派单给拼多多服务
     * @param orderWorkLogChange
     * @return void
     * @author wangxiaokun
     */
    void sendUpdateOrderToPinDuoDuo(OrderWorkLogChange orderWorkLogChange) throws OmsBaseException;

    /**
     * 同步服务预约给拼多多服务
     * @param orderWorkLogChange
     * @return void
     * @author wangxiaokun
     */
    void sendAppointOrderToPinDuoDuo(OrderWorkLogChange orderWorkLogChange) throws OmsBaseException;

    /**
     * 同步工程师上门给拼多多服务
     * @param orderWorkLogChange
     * @return void
     * @author wangxiaokun
     */
    void sendBeginServiceToPinDuoDuo(OrderWorkLogChange orderWorkLogChange) throws OmsBaseException;

    /**
     * 同步取消订单给拼多多服务
     * @param orderWorkLogChange
     * @return void
     * @author wangxiaokun
     */
    void sendCancelOrderToPinDuoDuo(OrderWorkLogChange orderWorkLogChange) throws OmsBaseException;

    /**
     * 同步订单完成给拼多多服务
     * @param orderWorkLogChange
     * @return void
     * @author wangxiaokun
     */
    void sendFinishOrderToPinDuoDuo(OrderWorkLogChange orderWorkLogChange) throws OmsBaseException;

    /**
     * 同步核销码给拼多多服务
     * @param orderId
     * @param wordId
     * @param code
     * @return void
     * @author wangxiaokun
     */
    void sendVerifyCheckToPinDuoDuo(Long orderId, Long wordId, String code, Integer channelId) throws OmsBaseException;

    /**
     * 厂商管理店铺审核结果处理
     * @param pinDuoDuoShopExamineDTO 
     * @return void
     * @author wangxiaokun
     */
    void examineResult(PinDuoDuoShopExamineDTO pinDuoDuoShopExamineDTO);
}
